<?php defined('SYSPATH') or die('No direct script access.');

class Model_Request extends ORM {

  protected $_table_name = 'requests';
  protected $_sorting = array('id' => 'desc');

  public function validate_add($array) {
    $validation = Validate::factory($array)
                    ->rule('name', 'not_empty')
                    ->rule('nick', 'not_empty')
                    ->rule('email', 'email')
                    ->rule('about', 'not_empty')
                    ->rule('pattern', 'not_empty')
                    ->rule('src', 'not_empty');
    return $validation;
  }

}
